<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateItemPedidoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateItemPedidoLabel_dataPedido}" for="dataPedido" />
                    <h:inputText id="dataPedido" value="#{itemPedidoController.selected.dataPedido}" title="#{bundle.CreateItemPedidoTitle_dataPedido}" required="true" requiredMessage="#{bundle.CreateItemPedidoRequiredMessage_dataPedido}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.CreateItemPedidoLabel_qtd}" for="qtd" />
                    <h:inputText id="qtd" value="#{itemPedidoController.selected.qtd}" title="#{bundle.CreateItemPedidoTitle_qtd}" required="true" requiredMessage="#{bundle.CreateItemPedidoRequiredMessage_qtd}"/>
                    <h:outputLabel value="#{bundle.CreateItemPedidoLabel_dataBaixa}" for="dataBaixa" />
                    <h:inputText id="dataBaixa" value="#{itemPedidoController.selected.dataBaixa}" title="#{bundle.CreateItemPedidoTitle_dataBaixa}" />
                    <h:outputLabel value="#{bundle.CreateItemPedidoLabel_statusPedido}" for="statusPedido" />
                    <h:inputText id="statusPedido" value="#{itemPedidoController.selected.statusPedido}" title="#{bundle.CreateItemPedidoTitle_statusPedido}" required="true" requiredMessage="#{bundle.CreateItemPedidoRequiredMessage_statusPedido}"/>
                    <h:outputLabel value="#{bundle.CreateItemPedidoLabel_produto}" for="produto" />
                    <h:selectOneMenu id="produto" value="#{itemPedidoController.selected.produto}" title="#{bundle.CreateItemPedidoTitle_produto}" required="true" requiredMessage="#{bundle.CreateItemPedidoRequiredMessage_produto}">
                        <f:selectItems value="#{produtoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateItemPedidoLabel_pedido}" for="pedido" />
                    <h:selectOneMenu id="pedido" value="#{itemPedidoController.selected.pedido}" title="#{bundle.CreateItemPedidoTitle_pedido}" required="true" requiredMessage="#{bundle.CreateItemPedidoRequiredMessage_pedido}">
                        <f:selectItems value="#{pedidoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{itemPedidoController.create}" value="#{bundle.CreateItemPedidoSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{itemPedidoController.prepareList}" value="#{bundle.CreateItemPedidoShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateItemPedidoIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
